package com.cecil.generate.exception;

import com.cecil.generate.model.ResultEnum;
import lombok.Getter;

/**
 * 自定义异常
 */
@Getter
public class BusinessException extends RuntimeException {

    /**
     * 错误代号
     */
    private Integer errorCode;

    public BusinessException() {
    }

    public BusinessException(String message) {
        super(message);
        this.errorCode = ResultEnum.ERROR.value;
    }

    public BusinessException(String message, Integer errorCode) {
        super(message);
        this.errorCode = errorCode;
    }

}
